<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class type_dispatcher</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Log v2">
<link rel="up" href="../../utilities.html#header.boost.log.utility.type_dispatch.type_dispatcher_hpp" title="Header &lt;boost/log/utility/type_dispatch/type_dispatcher.hpp&gt;">
<link rel="prev" href="static_type_dispatcher.html" title="Class template static_type_dispatcher">
<link rel="next" href="type_dispatcher/callback.html" title="Class template callback">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="static_type_dispatcher.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.type_dispatch.type_dispatcher_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="type_dispatcher/callback.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.log.type_dispatcher"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class type_dispatcher</span></h2>
<p>boost::log::type_dispatcher — A type dispatcher interface. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../utilities.html#header.boost.log.utility.type_dispatch.type_dispatcher_hpp" title="Header &lt;boost/log/utility/type_dispatch/type_dispatcher.hpp&gt;">boost/log/utility/type_dispatch/type_dispatcher.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="type_dispatcher.html" title="Class type_dispatcher">type_dispatcher</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// member classes/structs/unions</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span> 
  <span class="keyword">class</span> <a class="link" href="type_dispatcher/callback.html" title="Class template callback">callback</a> <span class="special">{</span>
  <span class="keyword">public</span><span class="special">:</span>

    <span class="comment">// <a class="link" href="type_dispatcher/callback.html#idm45961914789696-bb">public member functions</a></span>
    <span class="keyword">void</span> <a class="link" href="type_dispatcher/callback.html#idm45961914789136-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
    <span class="keyword">explicit</span> <a class="link" href="type_dispatcher/callback.html#idm45961914786160-bb"><span class="keyword">operator</span> <span class="keyword">bool</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
    <span class="keyword">bool</span> <a class="link" href="type_dispatcher/callback.html#idm45961914784304-bb"><span class="keyword">operator</span><span class="special">!</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="special">}</span><span class="special">;</span>
  <span class="comment">// <a class="link" href="type_dispatcher.html#boost.log.type_dispatcherconstruct-copy-destruct">construct/copy/destruct</a></span>
  <span class="keyword">explicit</span> <a class="link" href="type_dispatcher.html#idm45961914777152-bb"><span class="identifier">type_dispatcher</span></a><span class="special">(</span><span class="identifier">get_callback_impl_type</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="type_dispatcher.html#idm45961914782560-bb">protected member functions</a></span>
   <a class="link" href="type_dispatcher.html#idm45961914781984-bb"><span class="identifier">BOOST_DEFAULTED_FUNCTION</span></a><span class="special">(</span><a class="link" href="type_dispatcher.html" title="Class type_dispatcher">type_dispatcher</a><span class="special">(</span><a class="link" href="type_dispatcher.html" title="Class type_dispatcher">type_dispatcher</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="identifier">that</span><span class="special">)</span><span class="special">,</span> 
                            <span class="special">:</span><span class="identifier">m_get_callback_impl</span><span class="special">(</span><span class="identifier">that</span><span class="special">.</span><span class="identifier">m_get_callback_impl</span><span class="special">)</span> <span class="special">{</span><span class="special">}</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm46846441190400"></a><h2>Description</h2>
<p>All type dispatchers support this interface. It is used to acquire the visitor interface for the requested type. </p>
<div class="refsect2">
<a name="idm46846441189600"></a><h3>
<a name="boost.log.type_dispatcherconstruct-copy-destruct"></a><code class="computeroutput">type_dispatcher</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="idm45961914777152-bb"></a><span class="identifier">type_dispatcher</span><span class="special">(</span><span class="identifier">get_callback_impl_type</span> get_callback_impl<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Initializing constructor </p>
</li></ol></div>
</div>
<div class="refsect2">
<a name="idm46846441181328"></a><h3>
<a name="idm45961914782560-bb"></a><code class="computeroutput">type_dispatcher</code> protected member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"> <a name="idm45961914781984-bb"></a><span class="identifier">BOOST_DEFAULTED_FUNCTION</span><span class="special">(</span><a class="link" href="type_dispatcher.html" title="Class type_dispatcher">type_dispatcher</a><span class="special">(</span><a class="link" href="type_dispatcher.html" title="Class type_dispatcher">type_dispatcher</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="identifier">that</span><span class="special">)</span><span class="special">,</span> 
                          <span class="special">:</span><span class="identifier">m_get_callback_impl</span><span class="special">(</span><span class="identifier">that</span><span class="special">.</span><span class="identifier">m_get_callback_impl</span><span class="special">)</span> <span class="special">{</span><span class="special">}</span><span class="special">)</span><span class="special">;</span></pre>
<p>The method requests a callback for the value of type <code class="computeroutput">T</code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The type-specific callback or an empty value, if the type is not supported </p></td>
</tr></tbody>
</table></div>
</li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2007-2021 Andrey Semashev<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="static_type_dispatcher.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.type_dispatch.type_dispatcher_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="type_dispatcher/callback.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
